﻿using System;
using System.Collections.Generic;
using System.Text;
using Castle.ActiveRecord;
using Castle.Components.Validator;
using MiragePWF.NH.Validation;
using Wolfut.MirageEE.Kernal.Common;

namespace Wolfut.MirageEE.Domain
{
    /// <summary>
    /// 销售退货明细信息
    /// </summary>
    /// <remarks>
    /// Author: Leo
    /// Date: 2009-03-14
    /// </remarks>
    [ActiveRecord("SALES_RETURN_DETAILS")]
    public class SOGoodsReturnOrderDetail : PersistentObjectWithGuid
    {
        #region 销售退货单ID
        private string salesReturnInfoID = string.Empty;
        [Property("SALES_RETURN_INFO_ID")]
        [ValidateNonEmpty, ValidateLength(0, 40, "销售退货单ID超长")]
        public virtual string SalesReturnInfoID
        {
            get { return salesReturnInfoID; }
            set { salesReturnInfoID = value; }
        }
        #endregion

        #region 商品ID
        private string productID = string.Empty;
        [Property("PRODUCT_ID")]
        [ValidateNonEmpty, ValidateLength(0, 40, "商品ID超长")]
        public virtual string ProductID
        {
            get { return productID; }
            set { productID = value; }
        }
        #endregion

        #region 销售单ID
        private string salesBillID = string.Empty;
        [Property("SALES_BILL_ID")]
        [ValidateNonEmpty, ValidateLength(0, 40, "销售单ID超长")]
        public virtual string SalesBillID
        {
            get { return salesBillID; }
            set { salesBillID = value; }
        }
        #endregion

        #region 销售单编号
        private string salesBillCode = string.Empty;
        [Property("SALES_BILL_CODE")]
        [ValidateNonEmpty, ValidateLength(0, 40, "销售单编号超长")]
        public virtual string SalesBillCode
        {
            get { return salesBillCode; }
            set { salesBillCode = value; }
        }
        #endregion

        #region 仓库ID
        private string warehouseID = string.Empty;
        [Property("WAREHOUSE_ID")]
        [ValidateNonEmpty, ValidateLength(0, 40, "仓库ID超长")]
        public virtual string WarehouseID
        {
            get { return warehouseID; }
            set { warehouseID = value; }
        }
        #endregion

        #region 科目ID
        private string subjectID = string.Empty;
        [Property("SUBJECT_ID")]
        [ValidateNonEmpty, ValidateLength(0, 40, "科目ID超长")]
        public virtual string SubjectID
        {
            get { return subjectID; }
            set { subjectID = value; }
        }
        #endregion

        #region 销售类别
        private string salesCategory = string.Empty;
        [Property("SALES_CATEGORY")]
        [ValidateNonEmpty, ValidateLength(0, 100, "销售类别超长")]
        public virtual string SalesCategory
        {
            get { return salesCategory; }
            set { salesCategory = value; }
        }
        #endregion

        #region 数量
        private decimal quantity;
        [Property("QUANTITY")]
        [ValidateNonEmpty]
        public virtual decimal Quantity
        {
            get { return quantity; }
            set { quantity = value; }
        }
        #endregion

        #region 单价
        private decimal unitPrice;
        [Property("UNIT_PRICE")]
        [ValidateNonEmpty]
        public virtual decimal UnitPrice
        {
            get { return unitPrice; }
            set { unitPrice = value; }
        }
        #endregion

        #region 单价类别
        private string unitPriceCategory = string.Empty;
        [Property("UNIT_PRICE_CATEGORY")]
        public virtual string UnitPriceCategory
        {
            get { return unitPriceCategory; }
            set { unitPriceCategory = value; }
        }
        #endregion

        #region 折扣率
        private decimal discountRate;
        [Property("DISCOUNT_RATE")]
        public virtual decimal DiscountRate
        {
            get { return discountRate; }
            set { discountRate = value; }
        }
        #endregion

        #region 折扣额
        private decimal discountAmount;
        [Property("DISCOUNT_AMOUNT")]
        public virtual decimal DiscountAmount
        {
            get { return discountAmount; }
            set { discountAmount = value; }
        }
        #endregion

        #region 税率
        private decimal taxRate;
        [Property("TAX_RATE")]
        public virtual decimal TaxRate
        {
            get { return taxRate; }
            set { taxRate = value; }
        }
        #endregion

        #region 税额
        private decimal taxAmount;
        [Property("TAX_AMOUNT")]
        public virtual decimal TaxAmount
        {
            get { return taxAmount; }
            set { taxAmount = value; }
        }
        #endregion

        #region 销售额
        private decimal salesSum;
        [Property("SALES_SUM")]
        public virtual decimal SalesSum
        {
            get { return salesSum; }
            set { salesSum = value; }
        }
        #endregion

        #region 金额
        private decimal totalSum;
        [Property("TOTAL_SUM")]
        public virtual decimal TotalSum
        {
            get { return totalSum; }
            set { totalSum = value; }
        }
        #endregion

        #region 是否删除
        private bool isDeleted;
        [Property("IS_DELETED")]
        [ValidateNonEmpty]
        public virtual bool IsDeleted
        {
            get { return isDeleted; }
            set { isDeleted = value; }
        }
        #endregion
    }
}
